home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / accessibility / nsAccessibleWrap.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  101 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* vim:expandtab:shiftwidth=4:tabstop=4:
  3.  */
  4. /* ***** BEGIN LICENSE BLOCK *****
  5.  * Version: NPL 1.1/GPL 2.0/LGPL 2.1
  6.  *
  7.  *
  8.  * The contents of this file are subject to the Mozilla Public
  9.  * License Version 1.1 (the "License"); you may not use this file
  10.  * except in compliance with the License. You may obtain a copy of
  11.  * the License at http://www.mozilla.org/MPL/
  12.  *
  13.  * Software distributed under the License is distributed on an "AS
  14.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  15.  * implied. See the License for the specific language governing
  16.  * rights and limitations under the License.
  17.  *
  18.  * The Original Code is mozilla.org code.
  19.  *
  20.  * The Initial Developer of the Original Code is Sun Microsystems, Inc.
  21.  * Portions created by Sun Microsystems are Copyright (C) 2002 Sun
  22.  * Microsystems, Inc. All Rights Reserved.
  23.  *
  24.  * Original Author: Bolian Yin (bolian.yin@sun.com)
  25.  *
  26.  * Contributor(s): John Sun (john.sun@sun.com)
  27.  *
  28.  * Alternatively, the contents of this file may be used under the terms of
  29.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  30.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  31.  * in which case the provisions of the GPL or the LGPL are applicable instead
  32.  * of those above. If you wish to allow use of your version of this file only
  33.  * under the terms of either the GPL or the LGPL, and not to allow others to
  34.  * use your version of this file under the terms of the NPL, indicate your
  35.  * decision by deleting the provisions above and replace them with the notice
  36.  * and other provisions required by the GPL or the LGPL. If you do not delete
  37.  * the provisions above, a recipient may use your version of this file under
  38.  * the terms of any one of the NPL, the GPL or the LGPL.
  39.  *
  40.  * ***** END LICENSE BLOCK ***** */
  41.  
  42. #ifndef __NS_ACCESSIBLE_WRAP_H__
  43. #define __NS_ACCESSIBLE_WRAP_H__
  44.  
  45. #include "nsCOMPtr.h"
  46. #include "nsAccessible.h"
  47.  
  48. #include "prlog.h"
  49.  
  50. #ifdef PR_LOGGING
  51. #define MAI_LOGGING
  52. #endif /* #ifdef PR_LOGGING */
  53.  
  54. class nsAccessibleWrap;
  55. class MaiInterface;
  56.  
  57. struct _AtkObject;
  58. typedef struct _AtkObject AtkObject;
  59.  
  60. /**
  61.  * nsAccessibleWrap, and its descendents in atk directory provide the
  62.  * implementation of AtkObject.
  63.  */
  64. class nsAccessibleWrap: public nsAccessible
  65. {
  66. public:
  67.     nsAccessibleWrap(nsIDOMNode*, nsIWeakReference *aShell);
  68.     virtual ~nsAccessibleWrap();
  69.  
  70. #ifdef MAI_LOGGING
  71.     virtual void DumpnsAccessibleWrapInfo(int aDepth) {}
  72.     static PRInt32 mAccWrapCreated;
  73.     static PRInt32 mAccWrapDeleted;
  74. #endif
  75.  
  76. public:
  77.     // return the atk object for this nsAccessibleWrap
  78.     NS_IMETHOD GetNativeInterface(void **aOutAccessible);
  79.     NS_IMETHOD GetExtState(PRUint32 *aState);
  80.  
  81.     AtkObject * GetAtkObject(void);
  82.     MaiInterface *GetMaiInterface(PRInt16 aIfaceType);
  83.  
  84.     PRBool IsValidObject();
  85.  
  86.     static void TranslateStates(PRUint32 aState,
  87.                                 PRUint32 aExtState,
  88.                                 void *aAtkStateSet);
  89. protected:
  90.     AtkObject *mMaiAtkObject;
  91.  
  92. private:
  93.     nsresult CreateMaiInterfaces(void);
  94.     nsresult AddMaiInterface(MaiInterface *aMaiIface);
  95.  
  96.     MaiInterface **mInterfaces;
  97.     PRUint32 mInterfaceCount;
  98. };
  99.  
  100. #endif /* __NS_ACCESSIBLE_WRAP_H__ */
  101.